package jlfm.lastfm.apps.recorder;

import jlfm.lastfm.client.impl.simple.ProxyConfiguration;
import jlfm.lastfm.station.LastFmGlobalTagStation;
import jlfm.lastfm.station.LastFmStation;

public class RecorderOptions {
	private String userName = "";

	private String pw = "";

	private LastFmStation station = new LastFmGlobalTagStation("Rock");

	private String fileNamePattern = System.getProperty("user.home", ".")
			+ "/lastfm-rip/%Artist/%Album/%Track.mp3";

	private boolean musicBrainzEnabled = true;

	private boolean showProgress = false;

	private String m3uFileName = null;

	private boolean printHelp = true;

	private ProxyConfiguration proxyConfiguration = new ProxyConfiguration();

	public boolean isPrintHelp() {
		return printHelp;
	}

	public void setPrintHelp(boolean printHelp) {
		this.printHelp = printHelp;
	}

	public String getM3uFileName() {
		return m3uFileName;
	}

	public void setM3uFileName(String fileName) {
		m3uFileName = fileName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
		if (getPw() != null && getPw().length() > 0) {
			setPrintHelp(false);
		}
	}

	public String getPw() {
		return pw;
	}

	public void setPw(String pw) {
		this.pw = pw;
		if (getUserName() != null && getUserName().length() > 0) {
			setPrintHelp(false);
		}
	}

	public LastFmStation getStation() {
		return station;
	}

	public void setStation(LastFmStation station) {
		this.station = station;
	}

	public String getFileNamePattern() {
		return fileNamePattern;
	}

	public void setFileNamePattern(String pattern) {
		this.fileNamePattern = pattern;
	}

	public boolean isMusicBrainzEnabled() {
		return musicBrainzEnabled;
	}

	public void setMusicBrainzEnabled(boolean musicBrainzEnabled) {
		this.musicBrainzEnabled = musicBrainzEnabled;
	}

	public void setShowProgress(boolean b) {
		this.showProgress = b;

	}

	public boolean isShowProgress() {
		return showProgress;
	}

	public ProxyConfiguration getProxyConfiguration() {
		return proxyConfiguration;
	}

	/**
	 * @param proxyConfiguration
	 *            the proxyConfiguration to set
	 */
	public void setProxyConfiguration(ProxyConfiguration proxyConfiguration) {
		this.proxyConfiguration = proxyConfiguration;
	}

}
